package com.dragon.app.commons.utils;

import com.fintech.common.entity.ResultData;
import com.fintech.user.entity.User;

public class UserUtils {

	private static final ThreadLocal<User> USER_THREAD_LOCAL = new ThreadLocal<User>();
	
	public static void setUser(User user){
		USER_THREAD_LOCAL.set(user);
	}
	
/*	public static User getUser(){
		return USER_THREAD_LOCAL.get();
	}*/
	
	public static User getUser(String accessToken, String idFintechUmUser){
		ResultData<?> verifyUser = com.fintech.common.util.RedisUtils.verifyUser(accessToken, idFintechUmUser,User.class);
		return (User)verifyUser.getData();
	}
}
